]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
tests: Don't initialize Clutter
authorFlorian Müllner <fmuellner@gnome.org>
Sun, 25 Aug 2019 07:39:04 +0000 (10:39 +0300)
committerFlorian Müllner <fmuellner@gnome.org>
Tue, 27 Aug 2019 12:30:51 +0000 (15:30 +0300)
Clutter's backend code depends on MetaBackend now, which makes it
impossible to initialize without resorting to private mutter API.

Luckily we only need Clutter for interactive tests which are broken
anyway, as Clutter.main() and friends were removed a while ago.

So for now, get at least unit tests working again by simply the
unnecessary Clutter initialization.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/691

src/run-js-test.c

index 172ec179f240c792a4fbe89563192dd9b311a72b..ba5e875e8736b2bb1147fc252e5d1d247e53f186 100644 (file)
 #include <stdlib.h>
 #include <string.h>
 
-#include <clutter/x11/clutter-x11.h>
-#include <gdk/gdkx.h>
 #include <girepository.h>
 #include <gjs/gjs.h>
-#include <gtk/gtk.h>
 
 #include "shell-global.h"
 #include "shell-global-private.h"
@@ -59,17 +56,6 @@ main(int argc, char **argv)
   gsize len;
   int code;
 
-  gdk_set_allowed_backends("x11");
-
-  gtk_init (&argc, &argv);
-
-  clutter_x11_set_display (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()));
-
-  if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
-    return 1;
-
-  gdk_x11_display_set_window_scale (gdk_display_get_default (), 1);
-
   context = g_option_context_new (NULL);
 
   /* pass unknown through to the JS script */